//
//  Config.h
//  TianjinBoHai
//
//  Created by 李莹 on 15/1/16.
//  Copyright (c) 2015年 Binky Lee. All rights reserved.
//
#import <UIKit/UIKit.h>

#pragma mark --------log
#define VOTETEXTCOLOR [UIColor colorWithRed:0.47 green:0.47 blue:0.47 alpha:1]

//通用字号
#define DEF_FontSize_26 [UIFont systemFontOfSize:26]
#define DEF_FontSize_18 [UIFont systemFontOfSize:18]
#define DEF_FontSize_17 [UIFont systemFontOfSize:17]
#define DEF_FontSize_16 [UIFont systemFontOfSize:16]
#define DEF_FontSize_15 [UIFont systemFontOfSize:15]
#define DEF_FontSize_14 [UIFont systemFontOfSize:14]
#define DEF_FontSize_13 [UIFont systemFontOfSize:13]
#define DEF_FontSize_12 [UIFont systemFontOfSize:12]
#define DEF_FontSize_11 [UIFont systemFontOfSize:11]
#define DEF_FontSize_10 [UIFont systemFontOfSize:10]
#define DEF_FontSize_9 [UIFont systemFontOfSize:9]
#define DEF_FontSize_8 [UIFont systemFontOfSize:8]

#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self;

//计算label文字宽
#define getLabelStrWidth(label) [label.text boundingRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) options: NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : label.font} context:nil].size.width

#define getLabelStrHeight(label,width) [label.text boundingRectWithSize:CGSizeMake(width, MAXFLOAT) options: NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : label.font} context:nil].size.height

#define getStringHeight(str,width,font) [str boundingRectWithSize:CGSizeMake(width, MAXFLOAT) options: NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : font} context:nil].size.height

//屏幕宽高
#define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
#define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height

#define BOUND_HEIGHT self.bounds.size.height
#define BOUND_WIDTH self.bounds.size.width

//显示msg
#define ShowMessage(msg) [self.view makeToast:msg duration:1 position:CSToastPositionCenter]

//5S宽高比例

#define ScreenBounds [UIScreen mainScreen].bounds
#define WIDTH_5S_SCALE 320.0 * [UIScreen mainScreen].bounds.size.width
#define HEIGHT_5S_SCALE 568.0 * [UIScreen mainScreen].bounds.size.height

//#define Url(str) [NSString stringWithFormat:@"http://119.23.66.223/tourism%@",str]

//本地
//#define Url(str) [NSString stringWithFormat:@"http://192.168.1.138:9510/tourism%@",str]
//http://39.107.117.161/Home
//客户服务器
//#define Url(str) [NSString stringWithFormat:@"http://39.107.117.161/Home%@",str]
#define Url(str) [NSString stringWithFormat:@"http://119.23.66.223/tourism/Home%@",str]
#define AvatarUrl(str) [NSString stringWithFormat:@"http://119.23.66.223/tourism%@",str]

@interface Config : NSObject


/**
 *  主颜色
 */
extern NSString *mainColor;

extern NSString *textColor;

extern NSString *blackColor;

extern NSString *whiteColor;

extern NSString *bgColor;

extern NSString *dividerColor;

UIColor* getColor(NSString * hexColor);

@end
